package com.yj.springbootdesign.observe;

public class Client {
    public static void main(String[] args) {
        //初始化对象
        Hero hero = new Hero();
        MonsterObserver monsterObserver = new MonsterObserver();
        StuckObserver stuckObserver = new StuckObserver();
        hero.addObserver(monsterObserver);
        hero.addObserver(stuckObserver);
        hero.move();
    }
}
